package com.ln.property_control.mapper;

import com.ln.property_control.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 刘念
 * @create 2021-07-08-15:34
 */
public interface TransferMapper {
    List<TransferVo> selectTransferAll();
    //查看
    TransferVo selectByOrderNo(String transfer_order_no);

    List<PropertyAndTransferVo> selectByOrderNOProperty(String transfer_order_no);

    //获取部门相关信息
    List<Department> selectByParentId(int did);

    //获取资产转移类型
    List<TransferType> selectTransferType();

    //获取需要转移的资产
    List<PropertyVo> selectPropertyByDid(int did);

    //添加资产转移
    int AddTransfer(Transfer transfer);

    //添加资产转移和资产
    int AddTransferAndProperty(@Param("transfer_id") int transfer_id,@Param("property_id")String[] property_id);

    int updateStatus(@Param("transfer_status") int transfer_status,@Param("transfer_order_no") String transfer_order_no);

    int addAudit(@Param("applicant") String applicant,@Param("transfer_order_no") String transfer_order_no);

    List<AuditVo> selectAudit();

    int updateAuditStatus(@Param("transfer_status") int transfer_status,@Param("transfer_order_no") String transfer_order_no,@Param("user_name")String user_name);

    int deleteDepAndProByDepId(int depar_id);

    int addDepartmentAndProperty(@Param("after_depar_id")int after_depar_id,@Param("property_id") String[] property_id);

}
